Description
As part of a university full-stack web-application development project for the final year, the development of a friendship matching tool algorithm and its integration into a web-based application takes into consideration the MBTI psychological theory. The Myers-Briggs Type Indicator (MBTI) is a self-report test designed to identify a person's personality type, strengths, and preferences based on cognitive functions. The questionnaire was developed by Isabel Myers and her mother Katherine Briggs, drawing from Carl Jung's theory of personality types. Today, the MBTI theory is widely used as one of the world's most popular psychological instruments.
In this particular project, MBTI theory is used to find the most compatible friends for users within a university context, focusing on psychological functions. According to NHS England (National Health Service), approximately 45% of UK residents suffer from loneliness, and this issue extends to university students as well. Many individuals face challenges in forming new friendships in adulthood due to various factors, including lifestyle and behavioural attitudes. Often, these individuals are unfairly stereotyped or judged, such as introverted individuals being labelled as socially withdrawn. While social networks have provided some relief by connecting people regardless of their physical location, the aim of this project is to address this problem more comprehensively.
The Myers-Briggs Type Indicator (MBTI)
MBTI stands for the Myers-Briggs Type Indicator. It is a widely used psychological tool that assesses and categorizes personality types. The MBTI was developed by Isabel Briggs Myers and her mother, Katherine Briggs, based on the theories of Swiss psychiatrist Carl Jung.
The MBTI measures personality across four dichotomies:
2. Sensing (S) vs. Intuition (N): This dichotomy explores how individuals gather and process information. Sensing types rely on concrete data and details, focusing on what is tangible and practical, while intuitive types are more inclined to look at patterns, possibilities, and the bigger picture.
3. Thinking (T) vs. Feeling (F): This dichotomy examines how individuals make decisions and evaluate information. Thinking types prioritize logical analysis, objectivity, and consistency, whereas feeling types prioritize personal values, emotions, and the impact on others.
4. Judging (J) vs. Perceiving (P): This dichotomy relates to how individuals approach and structure their external environment. Judging types prefer order, planning, and decisiveness, while perceiving types are more adaptable, spontaneous, and open-ended.
These dichotomies combine to form sixteen different personality types, such as ISTJ, ENFP, or ENTJ. Each type represents a unique combination of these preferences and provides insights into how individuals perceive the world, make decisions, and interact with others. The MBTI is commonly used in various settings, including personal development, career counseling, and team-building exercises.
The 16 personalities types are:
1. ISTJ: Introverted, Sensing, Thinking, Judging
2. ISFJ: Introverted, Sensing, Feeling, Judging
3. INFJ: Introverted, Intuition, Feeling, Judging
4. INTJ: Introverted, Intuition, Thinking, Judging
5. ISTP: Introverted, Sensing, Thinking, Perceiving
6. ISFP: Introverted, Sensing, Feeling, Perceiving
7. INFP: Introverted, Intuition, Feeling, Perceiving
8. INTP: Introverted, Intuition, Thinking, Perceiving
9. ESTP: Extraverted, Sensing, Thinking, Perceiving
10. ESFP: Extraverted, Sensing, Feeling, Perceiving
11. ENFP: Extraverted, Intuition, Feeling, Perceiving
12. ENTP: Extraverted, Intuition, Thinking, Perceiving
13. ESTJ: Extraverted, Sensing, Thinking, Judging
14. ESFJ: Extraverted, Sensing, Feeling, Judging
15. ENFJ: Extraverted, Intuition, Feeling, Judging
16. ENTJ: Extraverted, Intuition, Thinking, Judging
The MBTI-based Algorithm
The algorithm incorporates the MBTI personality types by calculating the compatibility between a user's MBTI type and other MBTI types. Upon calculating the match, it provides the web-based application with the match rate and the corresponding MBTI personality types. This allows the application to retrieve compatible users from the database who possess these matching values.
This Python algorithm follows a linear search pattern to incorporate a user's MBTI type. It utilises a linear search to check for identical dichotomies in other MBTI personality types and their frequencies. Each dichotomy is assigned a value of 25%, and all 16 MBTI personality types are encapsulated in a dictionary containing lists of lists. Once the algorithm finds these matches and calculates their frequencies in each personality type, it only returns pairs of MBTI personality types with a match rate above 50%. These results are then transmitted to the web-based application using the Flask App, which is a Python web framework. This web framework is used also to retrieve the user's MBTI personality types from the web-based application.
To view the algorithm on Github, click here.
The Web-based Application
The web-based application consists of 10 webpages, which have been developed using HTML, CSS, Bootstrap, JavaScript, PHP, and MySQL. These technologies were used to create a user-friendly interface and functionality. The application enables users to create accounts inserting their personal MBTI personality types, reset passwords, and access the platform to find the most compatible friend based on their MBTI personality types.
The retrieval of compatible users occurs by accessing the database after receiving the output from the algorithm, which includes the match rate and compatible MBTI personality types. This retrieval process takes place on the server-side of the application using the Flask App and PHP scripting code. Once the compatible users are obtained from the database, they are categorized based on their MBTI personality types and displayed on the client-side of the web-based application, providing a sorted and organized presentation for the compatible users. The video below shows and explains the functionalities of the web-based application.
To view the demo of the web-based application, click here.
If you have a problem viewing the demo or have any feedback, feel free to complete this form.